package com.web.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.web.mapper.UserMapper;
import com.web.pojo.User;
import com.web.service.UserService;

@Service
public class UserServiceImpl  implements UserService{
	@Resource
	private UserMapper UserMapper;
	
	//查询所有用户
	@Override 
	public List<User> listUser(){
		return UserMapper.UserList();
	}
	//用户登入
	@Override
	public User UserGetByMailBoxAndPassword(String mailBox,String userPassword) {
		return UserMapper.UserGetByMailBoxAndPassword(mailBox,userPassword);
	}
	//通过用户名称查询
	@Override
	public User UserGetByUserName(String userName) {
		return UserMapper.UserGetByUserName(userName);
	}
	//小组名称查询
	@Override
	public List<User> UserGetBygGoupName(String groupName) {
		return UserMapper.UserGetBygGoupName(groupName);
	}
	//所属地区名称查询
	@Override
	public List<User> UserGetByAreaName(String areaName) {
		return UserMapper.UserGetByAreaName(areaName);
	};

}
